import React, { useEffect, useState } from 'react';
import { connect, history } from 'umi';
import TableMAX from '@/components/TableMAX';

function index(props: any) {
  // console.log(props, 'props');

  useEffect(() => {
    // props.state.length > 0
    //   ? ''
    //   :
    props.dispatch({ type: 'officeModel/fang_Office' });
  }, []);

  return (
    <div>
      <TableMAX state={props.state}></TableMAX>
    </div>
  );
}

const mapStateToProps = (state: any) => ({
  state: state.officeModel.list,
});

export default connect(mapStateToProps)(index);
